import editLoan from "../../store/modules/loan/editLoan";
<template>
  <div class="content">
    <div class="md-layout">
      <div class="md-layout-item md-medium-size-100 md-size-100">
        <form ref="editLoanForm">
          <md-card>
            <md-card-header data-background-color="green">
              <h4 style="margin:0;" class="title">基本信息</h4>
            </md-card-header>
            <md-card-content>
              <div class="md-layout">
                <div class="md-layout-item md-small-size-100 md-size-50">
                  <md-field md-clearable>
                    <label>经销商</label>
                    <md-input v-model="applydata.deaDealerName" type="text" required></md-input>
                  </md-field>
                </div>
                <div class="md-layout-item md-small-size-100 md-size-50">
                  <md-field md-clearable>
                    <label>金融机构</label>
                    <md-input v-model="applydata.fstFininstName" type="text" required maxlength="18"></md-input>
                  </md-field>
                </div>
                <div class="md-layout-item md-small-size-100 md-size-50">
                  <md-field md-clearable>
                    <label>金融产品</label>
                    <md-input v-model="applydata.proCarProductName" type="text" required></md-input>
                  </md-field>
                </div>
                <div class="md-layout-item md-small-size-100 md-size-50">
                  <md-field md-clearable>
                    <label>车辆品牌</label>
                    <md-input v-model="applydata.brdCarBrandName" type="text"></md-input>
                  </md-field>
                </div>
                <div class="md-layout-item md-small-size-100 md-size-50">
                  <md-field md-clearable>
                    <label>车型</label>
                    <md-input v-model="applydata.mdlCarModelName" type="text"></md-input>
                  </md-field>
                </div>
                <div class="md-layout-item md-small-size-100 md-size-50">
                  <md-field md-clearable>
                    <label>车型</label>
                    <md-input v-model="applydata.finCarColor" type="text"></md-input>
                  </md-field>
                </div>
              </div>
              <div class="md-layout-item md-size-100 text-right">
                  <md-button class="md-raised md-success" @click="submitEditLoan($refs.editLoanForm)">提交</md-button>
                </div>
            </md-card-content>
          </md-card>
        </form>
      </div>
    </div>
  </div>
</template>

<script>
import { mapActions } from 'vuex'
export default {
  name: 'editLoan',
  data () {
    return this.$store.state.editLoan.data
  },
  mounted () {
    this.loadLoanData(this.$route.params.id)
  },
  methods: {
    ...mapActions({
      loadLoanData: 'loadLoanData',
      submitEditLoan: 'submitEditLoan'
    })
  }
}
</script>

<style scoped>
  #fenkai>.md-card{margin:4px 0;}
  #fenkai>.md-card .title {margin-top: 0;margin-bottom: 0;}
  #fenkai>.md-card .md-field{padding-top:16px;margin:4px 0 4px;}
  #fenkai>.md-card .md-card-header {padding:8px;}

  #fenkai>div .md-card{margin:4px 0;}
  #fenkai>div .md-card .title {margin-top: 0;margin-bottom: 0;}
  #fenkai>div .md-card .md-field{padding-top:16px;margin:4px 0 4px;}
  #fenkai>div .md-card .md-card-header {padding:8px;}

  #fenkai>form .md-card{margin:4px 0;}
  #fenkai>form .md-card .title {margin-top: 0;margin-bottom: 0;}
  #fenkai>form .md-card .md-field{padding-top:16px;margin:4px 0 4px;}
  #fenkai>form .md-card .md-card-header {padding:8px;}
</style>
